package com.example.asus.practice.practice;

import android.content.Intent;
import android.net.Uri;
import android.os.Bundle;
import android.support.v7.app.AppCompatActivity;
import android.support.v7.widget.AppCompatButton;
import android.view.View;

import com.example.asus.practice.R;

public class Practice extends AppCompatActivity {

    private AppCompatButton bt_call;

    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_practice);

        bt_call = (AppCompatButton)findViewById(R.id.bt_call);

    }

    /**打电话给10086*/
    public void Call(View view){
        Intent intent = new Intent();

        intent.setAction("android.intent.action.CALL");
        intent.addCategory("android.intent.category.DEFAULT");

        Uri uri = Uri.parse("tel:18882311168");
        intent.setData(uri);
    }

}
